import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/employee/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/Admin/user/info',
    method: 'get',
    params: { token }
  })
}

/**
 * 查询菜单信息
 * @returns {AxiosPromise} 返回menu json对象
 */
export function findAllMenu() {
  return request({
    url: '/menu/findByEmployeeId',
    // url: '/menu/findMenu',
    method: 'post',
    // data
})
}

export function logout() {
  return request({
    url: '/employee/logout',
    method: 'post'
  })
}
